Skip to main content
Version: 5.x.x

UseFetchOptionsType


import { UseFetchOptionsType } from "@hyper-fetch/react"

Description

Defined in hooks/use-fetch/use-fetch.types.ts:7

Preview

type UseFetchOptionsType<T> = { bounce?: boolean; deepCompare?: boolean | typeof isEqual; dependencies?: any[]; dependencyTracking?: boolean; disabled?: boolean; initialData?: NullableType<Partial<ExtractAdapterReturnType<T>>>; refetchBlurred?: boolean; refetchOnBlur?: boolean; refetchOnFocus?: boolean; refetchOnReconnect?: boolean; refresh?: boolean; refreshTime?: number; revalidate?: boolean } & ({ bounceTime?: number; bounceType?: debounce } | { bounceTime?: number; bounceTimeout?: number; bounceType: throttle });

Structure

{
bounce: boolean;
deepCompare: boolean | typeof isEqual;
dependencies: any[];
dependencyTracking: boolean;
disabled: boolean;
initialData: T | NegativeTypes;
refetchBlurred: boolean;
refetchOnBlur: boolean;
refetchOnFocus: boolean;
refetchOnReconnect: boolean;
refresh: boolean;
refreshTime: number;
revalidate: boolean;
...params2: {bounceTime:number,bounceType:debounce} | {bounceTime:number,bounceTimeout:number,bounceType:throttle};
}